<div class="form">   

    <?php $this->render('cmswidgets.views.notification'); ?>
    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'delivery-form',
        'enableAjaxValidation' => true,
    ));
    ?>

    <?php echo $form->errorSummary($model); ?>
    <div>   
        <div class="left">
            <div class="row">
                <?php echo $form->labelEx($model, 'delivery_name'); ?>
                <?php echo $form->textField($model, 'delivery_name'); ?>
                <?php echo $form->error($model, 'delivery_name'); ?>
            </div>
            <div class="row" >
                <?php echo $form->labelEx($model, 'delivery_des'); ?>
                <?php echo $form->textField($model, 'delivery_des'); ?>
                <?php echo $form->error($model, 'delivery_des'); ?>
            </div>
            <div class="row" >
                <?php echo $form->labelEx($model, 'delivery_locale'); ?>
                <?php //echo $form->textField($model,'delivery_location'); ?>
                <?php
                $nameSelect = $model->delivery_locale ? $model->delivery_locale : 'VND';
                ?>
                <?php echo $form->dropDownList($model, 'delivery_locale', $listcountries, array('options' => array($nameSelect => array('selected' => 'selected')))); ?>
                <?php //echo Chtml::dropDownList($model, 'delivery_location', $listcountries, array('options' => array($nameSelect =>array('selected'=>true)))); ?>
                <?php echo $form->error($model, 'delivery_locale'); ?>
            </div>
            <div class="row" >
                <?php echo $form->labelEx($model, 'delivery_fee'); ?>
                <?php echo $form->textField($model, 'delivery_fee'); ?>
                <?php echo $form->error($model, 'delivery_fee'); ?>
            </div>
            <div class="row" >
                <?php echo $form->labelEx($model, 'delivery_weight'); ?>
                <?php echo $form->textField($model, 'delivery_weight'); ?>
                <?php echo $form->error($model, 'delivery_weight'); ?>
            </div>
            <div class="row" >
                <?php
                if ($act == 'update') {
                    echo $form->dropDownList($model, 'delivery_status', array('1' => 'Show', '0' => 'Hidden'), array('options' => array($model->delivery_status => array('selected' => true))));
                } else {
                    echo $form->hiddenField($model, 'delivery_status', array('value' => 1));
                }
                ?>
            </div>
        </div>
        <div class="clear"></div>
    </div>    

    <div class="row">
        <?php
        echo CHtml::submitButton(t('cms', 'Save'), array('class' => 'bebutton active'));
        ?>

    </div>

    <?php $this->endWidget(); ?>
</div><!-- form -->

